home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripts / js / oops / r3mport.js < prev    next >
Encoding:
JavaScript  |  2005-04-04  |  1.8 KB  |  85 lines

  1.  
  2. // JavaScript wrapper for r3mport.h
  3. // Auto generated file, do not modify by hand
  4. // Copyrights 2002, Realsoft Graphics Oy
  5.  
  6. var R3_MSGPORT_H = 1;
  7. include("oops/r3root.js")
  8.  
  9.  
  10. var R3CLID_MSGPORT = 4;
  11.  
  12.  
  13.  
  14.  
  15. // Description: Put message to a message port
  16. // p3: R3MESSAGE *, message to be sent
  17.  
  18. R3MPM_PUTMSG = 4000;
  19.  
  20. function mR3MPM_PUTMSG(p3) {
  21.   R3DoA(this.r3obj, R3MPM_PUTMSG, p3);
  22. }
  23.  
  24. // Description: Read message from a message port
  25. // Returns: R3MESSAGE *, message or NULL if no messages found
  26.  
  27. R3MPM_GETMSG = 4001;
  28.  
  29. function mR3MPM_GETMSG() {
  30.   return   R3DoA(this.r3obj, R3MPM_GETMSG, 0);
  31. }
  32.  
  33. // Description: Send message back to the sender.
  34. // p3: R3MESSAGE *, message to be replied
  35.  
  36. R3MPM_REPLYMSG = 4002;
  37.  
  38. function mR3MPM_REPLYMSG(p3) {
  39.   R3DoA(this.r3obj, R3MPM_REPLYMSG, p3);
  40. }
  41.  
  42.  
  43.  
  44.  
  45. // R3MPA_Task: Object, owner task (thread) 
  46. R3MPA_Task = 4500;
  47. function SetR3MPA_Task(value) {
  48.   R3Set(this.r3obj, R3MPA_Task, value); 
  49. }
  50.  
  51. function GetR3MPA_Task() {
  52.   return R3Get(this.r3obj, R3MPA_Task, R3TID_INTEGER, TRUE); // R3OBJ*
  53. }
  54.  
  55. // R3MPA_Signal: Object, signal object associated with the message port 
  56. R3MPA_Signal = 4501;
  57. function SetR3MPA_Signal(value) {
  58.   R3Set(this.r3obj, R3MPA_Signal, value); 
  59. }
  60.  
  61. function GetR3MPA_Signal() {
  62.   return R3Get(this.r3obj, R3MPA_Signal, R3TID_INTEGER, TRUE); // R3OBJ*
  63. }
  64.  
  65.  
  66.  
  67. function r3Msgport () { 
  68.    this.base = r3God;
  69.    if(arguments.length) {
  70.       this.base(R3CLID_MSGPORT, arguments);
  71.    }
  72.    // Methods
  73.    this.PUTMSG=mR3MPM_PUTMSG;
  74.    this.GETMSG=mR3MPM_GETMSG;
  75.    this.REPLYMSG=mR3MPM_REPLYMSG;
  76.  
  77.    // Attributes
  78.    this.GetTask=GetR3MPA_Task;
  79.    this.SetTask=SetR3MPA_Task;
  80.    this.GetSignal=GetR3MPA_Signal;
  81.    this.SetSignal=SetR3MPA_Signal;
  82. }
  83.  
  84. r3Msgport.prototype=new r3Root;
  85. // r3mport.h_H